#ifndef    __HTTPUTIL_H__
#define    __HTTPUTIL_H__
#include "stm32f10x.h"
#include "http_server.h"

#define HW_VERSION "WL003"
#define FW_VERSION "TY012"

#define WSBUF_SIZE      512

#define INIT        0
#define FAILED      1
#define SUCCEED     2

extern char http_tx_buf[MAX_URI_SIZE];
extern char http_rx_buf[MAX_URI_SIZE];

void proc_http(uint8_t s, uint8_t * buf);
void do_https(void);
void make_cgi_response(uint8_t num,uint8_t* url,int8_t* cgi_response_buf,uint8_t* html,uint8_t* Prompt);
uint8_t cgi_loginconfig(st_http_request *http_request);
uint8_t cgi_systeminfoconfig(st_http_request *http_request);
uint8_t cgi_usermodconfig(st_http_request *http_request);
uint16_t network_model(uint8_t *mode,uint8_t data[]);
uint8_t cgi_networkparameterconfig(st_http_request *http_request);

uint16_t authentication(uint8_t *mode,uint8_t data[]);
uint8_t cgi_safetymanagementconfig(st_http_request *http_request);

uint16_t dhcp_model(uint8_t *mode,uint8_t data[]);

void socket_send_buf(uint8_t s,uint8_t * buf,uint16_t len);
#endif


